<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBusinessTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('business', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('cid')->default(0)->comment('分类ID');
            $table->string('name')->default('')->comment('合作商名称');
            $table->string('phone')->default('')->comment('电话');
            $table->string('image')->nullable()->comment('图片');
            $table->string('longitude')->default('')->comment('经度');
            $table->string('latitude')->default('')->comment('纬度');
            $table->string('address')->default('')->comment('所在地址');
            $table->tinyInteger('status')->default('0')->comment('状态:0=正常,1=隐藏');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('business');
    }
}
